<%@ Control Language="C#" AutoEventWireup="true" CodeFile="NewThreadPage.ascx.cs" Inherits="forums_controls_threads_NewThreadPage" %>
<%@ Register Src="../posts/PreviewPost.ascx" TagName="PreviewPost" TagPrefix="uc2" %>
<%@ Register Src="../forums/breadcrumb.ascx" TagName="breadcrumb" TagPrefix="uc1" %>

<uc1:breadcrumb ID="Breadcrumb1" runat="server"
 NavigateUrlFormat="~/forums/forum.aspx?f={0}" RootItemText="FSTDT Forums" RootItemUrl="~/forums/default.aspx" Seperator=" . " UsePostBack="false" FooterText="Create New Thread"  />

<asp:Panel runat="server" ID="pnlThread" Width="100%">
    <asp:MultiView ID="mviewThread" runat="server">
        <asp:View ID="viewThread" runat="server">
            <uc2:PreviewPost ID="PreviewPost1" runat="server" />
            <p>
            Subject:
                <br />
            <asp:TextBox runat="server" ID="txtSubject" Width="300px" MaxLength="100" />
                <asp:RequiredFieldValidator ID="valSubjectRequired" runat="server" ControlToValidate="txtSubject"
                    EnableClientScript="False" ErrorMessage="You can't submit a thread without a subject."
                    ValidationGroup="NewThread"></asp:RequiredFieldValidator></p>
            <p>
            Post:<asp:RequiredFieldValidator ID="valPostRequired" runat="server" ErrorMessage="You gotta have something to say in your post."
                    ValidationGroup="NewThread" ControlToValidate="txtPost"></asp:RequiredFieldValidator><br />
            <asp:TextBox runat="server" ID="txtPost"
                TextMode="multiLine"
                Rows="25"
                Columns="80" />
            </p>
            <p>
            <asp:Button runat="server" ID="btnSubmit" Text="Post" OnClick="btnSubmit_Click" ValidationGroup="NewThread" />
                <asp:Button ID="btnPreview" runat="server" OnClick="btnPreview_Click" Text="Preview" /></p>
        </asp:View>
        <asp:View ID="viewNoForum" runat="server">
            Forum not found.
        </asp:View>
    </asp:MultiView></asp:Panel>